<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <link rel="stylesheet" type="text/css" href="{$contextPath}/pas/easyui/themes/{$page_theme | default: 'default'}/easyui.css">
    <link rel="stylesheet" type="text/css" href="{$contextPath}/pas/easyui/themes/icon.css">
    <link rel="stylesheet" type="text/css" href="{$contextPath}/pas/style/my.css">
    
    <script type="text/javascript" src="{$contextPath}/pas/easyui/jquery.min.js"></script>
    <script type="text/javascript" src="{$contextPath}/pas/easyui/jquery.easyui.min.js"></script>
    <script type="text/javascript" src="{$contextPath}/pas/javascript/my.js"></script>
    
</head>
<body onpageshow="resetPagination('dg')">
    {datagrid id="dg" view="f_flow_definition" }
    {form id="dlg" view="f_flow_definition" }
    
    <script>
    field_formatters.publish_status=function (value, row, index){
    	if(value == 9) {
    		return "已禁用";
    	} else if(value == 8) {
    		return "已发布";
    	} else {
    		return "待发布";
    	}
    }
    function showNodes() {
	    var row = getDatagrid('dg').datagrid('getSelected');
	    if(row) {
    		window.parent.openTab(row.name+'的节点','/flow/admin/flow_node.shtml?flow_def_id='+row.flow_def_id);
	    } else {
            $.messager.show({
                title: '提示',
                msg: '没有选择工单！'
            });
	    }
    }
    
    function showTransitions() {
	    var row = getDatagrid('dg').datagrid('getSelected');
	    if(row) {
    		window.parent.openTab(row.name+'的节点转换','/flow/admin/flow_node_transition.shtml?flow_def_id='+row.flow_def_id);
	    } else {
            $.messager.show({
                title: '提示',
                msg: '没有选择工单！'
            });
	    }
    }
    </script>
</body>
</html>